﻿#ifndef MCUCODEC_SETINTERVAL_MEMSDATA_H
#define MCUCODEC_SETINTERVAL_MEMSDATA_H

#include <qobject.h>
#include "MCUCodecBase.h"
#include "ObjAutoInject.h"

class MCUCodec;
class TcpCodec;
class MCUCodec_SetInterval_MEMSData : public QObject,public ObjAutoInject,public MCUCodecBase
{
  Q_OBJECT
/*
 *设备ID32bit,
  MCU操作类型8bit，
  MEMSData延时16bit，无符号短整型
*/
private://dependency
  MCUCodec* mCUCodec=Q_NULLPTR;
  TcpCodec* tcpCodec=Q_NULLPTR;
public:
  explicit MCUCodec_SetInterval_MEMSData();
  virtual ~MCUCodec_SetInterval_MEMSData();
signals:
public:
  virtual void decode(QByteArray data)override;
  void setInterval(uint deviceId,ushort interval);
public://geter and seter
  MCUCodec* getMCUCodec()const;
  MCUCodec_SetInterval_MEMSData* setMCUCodec(MCUCodec*const mCUCodec);
  TcpCodec* getTcpCodec()const;
  MCUCodec_SetInterval_MEMSData* setTcpCodec(TcpCodec* const tcpCodec);
public:
  virtual void objectAutoInjection(QHash<QString,QObject*>* objMap)override;
};

#endif // MCUCODEC_SETINTERVAL_MEMSDATA_H
